 $(function() {
				 
				 
				 var $divlbox_dd = $("div.lbox >dl > dd");
				 var $divlbox_span = $("span.lclick");
				  
				 $divlbox_span.toggle(function(){
										   var index = $divlbox_span.index(this);
										   switch(index){
											   case 0 :  $divlbox_dd.eq(0).animate({ 
																							 height:'330px'
																				 			 },500);
											   				$(this).css({ "background": "url(img/arrows_up.png) no-repeat right" });
											   break
											   case 1 :  $divlbox_dd.eq(1).animate({ 
																							 height:'320px'
																				 			 },500);
											   				$(this).css({ "background": "url(img/arrows_up.png) no-repeat right" });
											   break
											   }	
										  },
										  function(){
										   var index = $divlbox_span.index(this);
										 $divlbox_dd.eq(index).animate({ 
																							 height:'270px'
																		 					},500);	
										 $(this).css({ "background": "url(img/arrows_down.png) no-repeat right" });
										  });
				 
				 var $divboxlist_ul = $("div.boxlist > ul");
				 var $divboxlist_span = $("span.click");
				 
				 $divboxlist_span.toggle(function(){		   
										   var index = $divboxlist_span.index(this);
										   switch(index){
											   case 0 :  $divboxlist_ul.eq(0).animate({ 
																							 height:'80px'
																				 			 },500);
											   			   	$(this).css({ "background": "url(img/arrows_up.png) no-repeat right" });
											   break
											   case 1 :  $divboxlist_ul.eq(1).animate({ 
																							 height:'80px'
																				 			 },500);
											   				$(this).css({ "background": "url(img/arrows_up.png) no-repeat right" });
											   break
											   case 2 :  $divboxlist_ul.eq(2).animate({ 
																							 height:'80px'
																				 			 },500);
											   				$(this).css({ "background": "url(img/arrows_up.png) no-repeat right" });
											   break
											   case 3 :  $divboxlist_ul.eq(3).animate({ 
																							 height:'80px'
																				 			 },500);
											   				$(this).css({ "background": "url(img/arrows_up.png) no-repeat right" });
											   break
											   case 4 :  $divboxlist_ul.eq(4).animate({ 
																							 height:'170px'
																				 			 },500);
											   				$(this).css({ "background": "url(img/arrows_up.png) no-repeat right" });
											   break
											   case 5 :  $divboxlist_ul.eq(5).animate({ 
																							 height:'80px'
																				 			 },500);
											   				$(this).css({ "background": "url(img/arrows_up.png) no-repeat right" });
											   break
											   case 6 :  $divboxlist_ul.eq(6).animate({ 
																							 height:'60px'
																				 			 },500);
											   				$(this).css({ "background": "url(img/arrows_up.png) no-repeat right" });
											   break
											   /*复制case 到 break 的部分吧 index中的数值改为当前索引即可控制新的 box表*/
											   }	
										  },
										  function(){
										  var index = $divboxlist_span.index(this);
										 $divboxlist_ul.eq(index).animate({ 
																							 height:'52px'
																		 					},500);	
										 $(this).css({ "background": "url(img/arrows_down.png) no-repeat right" });
										  });
				 
				 var $sli = $("div.searthtitle > ul > li");
				 
				 $sli.click(function(){
									 $(this).addClass("liactive")
									 .siblings().removeClass("liactive");
									 var index = $sli.index(this);
									 $("div.searthtabs > div").eq(index).show()
									 						.siblings().hide();	
									 });
				 
				 $sli.hover(function(){
									$(this).find("p").stop(true,true).animate({opacity:"show"},200);
									 },
							function(){
									$(this).find("p").stop(true,true).animate({opacity:"hide"},200);
									});
				 
				 var $button = $("div.seaboxb span");
				 $button.hover(function(){
										
										$(this).find("input").stop(true,true).animate({opacity:"show"},200);
										},
							   function(){
								   		$(this).find("input").stop(true,true).animate({opacity:"hide"},200);
							   });
				 
				 
				 
				 
				 
				 
				 
				 
				 				
				 }); 
 

function AddFavorite(sURL, sTitle)
{
    try
    {
        window.external.addFavorite(sURL, sTitle);
    }
    catch (e)
    {
        try
        {
            window.sidebar.addPanel(sTitle, sURL, "");
        }
        catch (e)
        {
            alert("加入收藏失败，请使用Ctrl+D进行添加");
        }
    }
}
function SetHome(obj,vrl){
        try{
                obj.style.behavior='url(#default#homepage)';obj.setHomePage(vrl);
        }
        catch(e){
                if(window.netscape) {
                        try {
                                netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); 
                        } 
                        catch (e)  {
                                alert("此操作被浏览器拒绝！\n请在浏览器地址栏输入“about:config”并回车\n然后将[signed.applets.codebase_principal_support]设置为'true'"); 
                        }
                        var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefBranch);
                        prefs.setCharPref('browser.startup.homepage',vrl);
                 }
        }
}